<template>
  <div class="uu-box">
    <div class="uu-mibox">
      <div class="uu-top1">
        <div class="top1">个人设置</div>
        <div class="top2">
          <span @click="changespani" :class="{ spanhov: istop == 1 }"
            >基本设置</span
          >
          <span @click="changespanii" :class="{ spanhov: istop == 2 }"
            >绑定设置</span
          >
          <span @click="changespaniii" :class="{ spanhov: istop == 3 }"
            >隐私设置</span
          >
        </div>
      </div>

      <userdata v-if="istop == 1" />
      <Userbinding v-if="istop == 2" />
    </div>
  </div>
</template>

<script>
import userdata from "./Userdate";
import Userbinding from "./Userbinding";
export default {
  components: {
    userdata,
    Userbinding
  },
  data() {
    return {
      istop: 2,
    };
  },
  methods: {
    changespani() {
      this.istop = 1;
    },
    changespanii() {
      this.istop = 2;
    },
    changespaniii() {
      this.istop = 3;
    },
  },
};
</script>

<style lang="less" scoped>
.uu-box {
  width: 984px;
  margin: 0 auto;
  min-height: 1000px;
  background-color: rgb(255, 255, 255);
  .uu-mibox {
    width: 900px;
    margin: 0 auto;
    .uu-top1 {
      padding-top: 30px;
      .top1 {
        font-size: 22px;
      }
      .top2 {
        margin-top: 30px;
        font-size: 14px;
        width: 100%;
        background-color: #ede9e9b2;
        border: 1px solid #cccccc;
        span {
          display: inline-block;
          width: 120px;
          line-height: 40px;
          text-align: center;
        }
        span:hover {
          border-top: solid 1px red;
          margin-top: -1px;
        }
        .spanhov {
          border-top: solid 1px red;
          margin-top: -1px;
          margin-top: -1px;
          border-bottom: solid 1px #fff;
          margin-bottom: -1px;
          margin-left: -1px;
          border-left: solid 1px #cccccc;
          border-right: solid 1px #cccccc;
        }
      }
    }
  }
}
</style>
